package com.hyxt.utils.xml;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @Description xml异常
 * @author shenp
 */
public class XmlException extends Exception{
    /**
     * @Description 构造方法
     */
    public XmlException() {
        this.errors = new ArrayList(0);
    }

    /**
     * @Description 构造方法
     */
    public XmlException(String msg) {
        super(msg);
        this.errors = new ArrayList(1);
        this.errors.add(msg);
    }

    /**
     * @Description 构造方法
     */
    public XmlException(Collection errors) {
        super(errors.toString());
        this.errors = errors;
    }

    /**
     * @Description 获取异常
     */
    public Collection getErrors() {
        return this.errors;
    }

    /**
     * 错误集合
     */
    private Collection errors = null;
}
